# $Id: PKGBUILD 65055 2012-02-20 02:29:43Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: James Cozine <jmcozine@gmail.com>

pkgname="bbdb"
pkgver=2.35
pkgrel=5
pkgdesc="A rolodex-like database for Emacs"
arch=('any')
url="http://bbdb.sourceforge.net"
license=('GPL')
depends=('emacs')
install="$pkgname.install"
source=("http://bbdb.sourceforge.net/$pkgname-$pkgver.tar.gz")
md5sums=('5c4e7f2b2a6a8e25ff77351f533f3910')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  ./configure --prefix=/usr
  make -j1 all

  emacsdir="$pkgdir/usr/share/emacs/site-lisp/bbdb"
  mkdir -p "$emacsdir"
  cp lisp/*.el lisp/*.elc "$emacsdir"
  cp -a bits/ "$emacsdir"

  texdir="$pkgdir/usr/share/texmf-dist/tex/plain/bbdb"
  mkdir -p "$texdir"
  cp tex/*.tex "$texdir"

  infodir="$pkgdir/usr/share/info"
  mkdir -p "$infodir"
  cp texinfo/bbdb.info "$infodir"
  gzip "$infodir/bbdb.info"
}
